-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BE] socket 분리 로직 수정 #91
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!
@@ -22,7 +22,7 @@ import { RequestInterface } from './interface/request.interface'; | |||
@Controller('/api/stocks/trade') | |||
@ApiTags('주식 매수/매도 API') | |||
export class StockOrderController { | |||
constructor(private readonly stockTradeService: StockOrderService) {} | |||
constructor(private readonly stockOrderService: StockOrderService) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 이거 socket 분리 로직 수정 커밋 맞나요?? 소켓이랑 상관 없어보이는 코드 수정 같아 보이는데 커밋 나눠서 작성해주시면 더 좋을 거 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
에고 그렇네요ㅜ 다음부터 유의해서 커밋 올리겠습니당
|
||
@Injectable() | ||
export class StockIndexSocketService extends BaseSocketService { | ||
export class StockIndexSocketService { | ||
private TRADE_CODE = 'H0UPCNT0'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 제 개인적인 취향을 말하자면,, 한투에서 TR_ID
라는 이름으로 값을 받고 있으면 여기서도 동일하게 작성하는게 예뻐보이는데 어떻게 생각하시나요..?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 그게 더 좋을 것 같네요! 수정해서 커밋 추가했습니다.
(data: string[]) => { | ||
this.socketGateway.sendStockIndexValueToClient( | ||
this.STOCK_CODE[data[0]], | ||
new StockIndexValueElementDto(data[2], data[4], data[9], data[3]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 여기도 위에 코스피, 코스닥 이런 주석 단 것처럼 data[2], data[4] 이런 값이 어떤건지 주석으로 달아두면 코드 읽기가 더 좋을 거 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니당 주석 추가해두었습니다~!
헉 수정이 짱 빠르시네요.. 감동! |
✅ 주요 작업
💭 고민과 해결과정